package com.dulian.wallet.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dulian.wallet.entity.UserWallet;

import java.math.BigDecimal;

public interface UserWalletService extends IService<UserWallet> {
    /**
     * 查询用户钱包余额
     * @param userId
     * @return
     */
    BigDecimal getUserBalance(String userId);

    /**
     * 用户消费100元的接口
     * @param userId
     * @param money
     * @return
     */
    Boolean consume(String userId, String money);

    /**
     * 用户退款20元接口
     * @param userId
     * @param money
     * @return
     */
    Boolean refund(String userId, String money);
}
